' // ***************************************************************************
' // 
' // Copyright (c) Microsoft Corporation.  All rights reserved.
' // 
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File:      DeployWiz_DC1.vbs
' // 
' // Version:   6.1.2373.0
' // 
' // Purpose:   Main Client Deployment Wizard Initialization routines
' // 
' // ***************************************************************************

Option Explicit

Function InitializeComputerName

	If DC1OSDComputerName.Value = "" then
		DC1OSDComputerName.Value = oUtility.ComputerName 
	End if

End Function

Function ValidateComputerName

	' Check Warnings
	ParseAllWarningLabels


	If Len(DC1OSDComputerName.value) > 15 then
		InvalidChar.style.display = "none"
		TooLong.style.display = "inline"
		ValidateComputerName = false
		ButtonNext.disabled = true
	ElseIf IsValidComputerName ( DC1OSDComputerName.Value ) then
		ValidateComputerName = TRUE
		InvalidChar.style.display = "none"
		TooLong.style.display = "none"
	Else
		InvalidChar.style.display = "inline"
		TooLong.style.display = "none"
		ValidateComputerName = false
		ButtonNext.disabled = true
	End if

End function

